import 'package:flutter/material.dart';
import 'package:lib_core/lib_core.dart';
import 'package:lib_ui/lib_ui.dart';

class CommonTipsWidget extends StatelessWidget {
  Widget content;
  Widget tips;
  Function()? onClick;

  CommonTipsWidget({super.key, required this.content, required this.tips, this.onClick});

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        onClick?.call();
      },
      child: SizedBox(
        height: 40,
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Flexible(child: tips),
            const SizedBox(width: 3),
            GetBuilder<ThemeController>(builder: (controller) {
              return SuperTooltip(
                content: content,
                child: UIAssets.images.iconTips.svg(width: 18,colorFilter: ColorFilter.mode(controller.currentTheme.extension<AppThemeColors>()!.appBarLeadingColor, BlendMode.srcIn)),
              );
            })
          ],
        ),
      ),
    );
  }
}
